package com.jier.service.impl;

import com.jier.common.Page;
import com.jier.common.Result;
import com.jier.dao.SystemLogDao;
import com.jier.dto.BaseParamDto;
import com.jier.dto.SystemLogParamDto;
import com.jier.dto.SystemLogResultDto;
import com.jier.entities.SystemLog;
import com.jier.service.ISystemLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author jie_r
 * @date 2018/04/04
 */
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class SystemLogServiceImpl extends BaseServiceImpl<SystemLogDao, SystemLog> implements ISystemLogService {
    @Override
    public Result<SystemLogResultDto> getSystemLogs(SystemLogParamDto param, Page page) throws Exception {
        com.github.pagehelper.Page<SystemLogResultDto> listPage = getPageHelper(page).doSelectPage(() -> mapper.getSystemLogs(param));
        return getRecordPage(listPage, page);
    }
}
